package xyz.zhouzhaodong.crm.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import xyz.zhouzhaodong.crm.dto.UniversityAgencyFeeDto;
import xyz.zhouzhaodong.crm.service.IUniversityAgencyFeeService;
import xyz.zhouzhaodong.crm.util.NoRepeatSubmit;
import xyz.zhouzhaodong.crm.util.RestMessage;

import javax.annotation.Resource;

/**
 * <p>
 * 高校-中介费 前端控制器
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-22
 */
@RestController
@RequestMapping("/university-agency-fee")
public class UniversityAgencyFeeController {

    @Resource
    IUniversityAgencyFeeService universityAgencyFeeService;

    /**
     * 新增高校中介费
     * @param universityAgencyFeeDto
     * @return
     */
    @NoRepeatSubmit
    @RequestMapping("/add")
    public RestMessage addUniversityAgencyFee(UniversityAgencyFeeDto universityAgencyFeeDto){
        return universityAgencyFeeService.addUniversityAgencyFee(universityAgencyFeeDto);
    }

    /**
     * 删除高校中介费
     * @param universityAgencyFeeDto
     * @return
     */
    @RequestMapping("/delete")
    public RestMessage deleteUniversityAgencyFee(UniversityAgencyFeeDto universityAgencyFeeDto){
        return universityAgencyFeeService.deleteUniversityAgencyFee(universityAgencyFeeDto);
    }

    /**
     * 修改高校中介费
     * @param universityAgencyFeeDto
     * @return
     */
    @RequestMapping("/update")
    public RestMessage updateUniversityAgencyFee(UniversityAgencyFeeDto universityAgencyFeeDto){
        return universityAgencyFeeService.updateUniversityAgencyFee(universityAgencyFeeDto);
    }

    /**
     * 查询高校中介费
     * @param universityAgencyFeeDto
     * @return
     */
    @RequestMapping("/select")
    public RestMessage selectUniversityAgencyFee(UniversityAgencyFeeDto universityAgencyFeeDto){
        return universityAgencyFeeService.selectUniversityAgencyFee(universityAgencyFeeDto);
    }

}
